package com.example.birdfriends.pojo.read;

import org.apache.ibatis.type.Alias;

import java.sql.Timestamp;

@Alias("reader")
public class Reader {
    // 一个用户可以阅读一篇帖子多次，所以不同的reader可能有相同的uid和pid，只是这些read的rid和阅读时间不同
    private Long rid;  // 阅读帖子id
    private Timestamp readTime;  // 用户阅读帖子的时间
    private Long uid;  // 用户id
    private Long pid;  // 帖子id

    public void printRead() {
        System.out.println("Reader{" +
                "rid=" + rid +
                ", readTime=" + readTime +
                ", uid=" + uid +
                ", pid=" + pid +
                '}');
    }

    public void setRid(Long rid) {
        this.rid = rid;
    }

    public void setReadTime(Timestamp readTime) {
        this.readTime = readTime;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }

    public Long getRid() {
        return rid;
    }

    public Timestamp getReadTime() {
        return readTime;
    }

    public Long getUid() {
        return uid;
    }

    public Long getPid() {
        return pid;
    }
}
